<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
    <h1 class="h2">首页</h1>
    <span style="font-size: 20px">已经设置定时的任务数：{{taskStatus.count}}，正在运行的任务数：{{taskStatus.RUNNING}}</span>
    <div class="btn-toolbar mb-2 mb-md-0">
        <div class="btn-group mr-2">
            <!--<button class="btn btn-sm btn-outline-secondary" ng-click="getConfigList('simple')">simple</button>
            <button class="btn btn-sm btn-outline-secondary" ng-click="getConfigList('create_html_page')">create_html_page</button>-->

            <button class="btn btn-primary" ng-click="newRules()" data-toggle="modal" data-target="#new">新增
            </button>
        </div>
        <!--<button class="btn btn-sm btn-outline-secondary dropdown-toggle">-->
        <!--<span data-feather="calendar"></span>-->
        <!--This week-->
        <!--</button>-->
    </div>
</div>

<!--<canvas class="my-4 w-100" i></canvas>-->

<!--<h2>Section title</h2>-->
<!--<h2>Section title</h2>-->
<div class="table-responsive">
    <table class="table table-striped ">
        <thead class="w-100">
        <tr class="row mx-0">
            <th class="col-2">id</th>
            <th class="col-3">种子页面描述</th>
            <th class="col-4">种子网页网址</th>
            <th class="col-1">任务状态</th>
            <th class="col-1">数量</th>
            <th class="col-1"></th>
        </tr>
        </thead>
        <tbody class="w-100">
        <tr ng-repeat="config in configListStatus track by $index" class="row mx-0">
            <td class="col-2" ng-click="singleTask(config)" style="cursor: pointer;color: cornflowerblue">{{config.id}}</td>
            <td class="col-3">{{config.seedDescribe}}</td>
            <td class="col-4">
                <a href="{{config.seedUrl}}" target="_blank" title="{{config.seedUrl}}">{{config.seedUrl.length>80?config.seedUrl.substring(0,80)+'...':config.seedUrl}}</a>
            </td>
            <td class="col-1" >
                {{config.status}}
            </td>
            <td class="col-1" ng-click="goDetail(config)" style="cursor: pointer;color: cornflowerblue">
                {{config.num}}
            </td>
            <td class="col-1">
            <button type="button" data-dismiss="modal" ng-click="delete(config)" class="close"
                    aria-label="Close" data-target="#delete" data-toggle="modal">
                <span aria-hidden="true">&times;</span>
            </button>
            </td>
          <!--  <td class="col-3">
                <div style="float: right">
                    <button ng-click="parse(config)" type="button" class="btn btn-primary" data-toggle="modal"
                            data-target="#parse">
                        新增解析规则
                    </button>
                </div>
                <div style="float: right" ng-show="!config.hasQuartz">
                    <button ng-click="addQuartz(config)" type="button" class="btn btn-secondary" data-toggle="modal"
                            data-target="#addQuartz">
                        设置定时任务
                    </button>
                </div>
                <div style="float: right" ng-show="config.hasQuartz">
                    <button ng-click="modifyQuartz(config)" type="button" class="btn btn-secondary" data-toggle="modal"
                            data-target="#modifyQuartz">
                        修改定时任务
                    </button>
                </div>
                <div style="float: right" ng-show="config.hasQuartz">
                    <button ng-click="cancelQuartz(config)" type="button" class="btn btn-secondary" data-toggle="modal"
                            data-target="#cancelQuartz">
                        取消定时任务
                    </button>
                </div>
                <div style="float: right">
                    <button ng-click="delete(config)" type="button" class="btn btn-danger" data-toggle="modal"
                            data-target="#delete">
                        删除
                    </button>
                </div>
                <div style="float: right">
                    <button ng-click="detailData(config)" type="button" class="btn btn-primary" data-toggle="modal"
                            data-target="#exampleModalLong">
                        详情
                    </button>
                </div>

            </td>
            -->
        </tr>
        </tbody>
    </table>
</div>
<!--<div class="modal" id="cancelQuartz" tabindex="-1" role="dialog">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">确认取消</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <p>确定取消吗？</p>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" data-dismiss="modal" ng-click="cancelQuartzSure()">是</button>
                <button type="button" class="btn btn-secondary" data-dismiss="modal">否</button>
            </div>
        </div>
    </div>
</div>-->

<!-- Modal -->
<!--
<div class="modal fade" id="exampleModalLong" tabindex="-1" role="dialog" aria-labelledby="exampleModalLongTitle"
     aria-hidden="true">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="exampleModalLongTitle">网页配置</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <div class="input-group mb-3">
                    <div class="input-group-prepend">
                        <span class="input-group-text" id="inputGroup-sizing-id">id</span>
                    </div>
                    <input ng-model="updateData.id" readonly type="text" class="form-control" aria-label="Default"
                           aria-describedby="inputGroup-sizing-id"/>
                </div>

                <div class="input-group mb-3">
                    <div class="input-group-prepend">
                        <span class="input-group-text" id="inputGroup-sizing-describe">种子页面描述</span>
                    </div>
                    <input ng-model="updateData.seedDescribe" type="text" class="form-control" aria-label="Default"
                           aria-describedby="inputGroup-sizing-describe"/>
                </div>

                <div class="input-group mb-3">
                    <div class="input-group-prepend">
                        <span class="input-group-text">种类</span>
                    </div>
                    <input ng-model="updateData.catalog" type="text" class="form-control" aria-label="Default"
                           aria-describedby="inputGroup-sizing-catalog"/>
                </div>

                <div class="input-group mb-3">
                    <div class="input-group-prepend">
                        <span class="input-group-text">种子页面网址</span>
                    </div>
                    <textarea ng-model="updateData.seedUrl" type="text" class="form-control" aria-label="Default"
                              aria-describedby="inputGroup-sizing-seedUrl"/>
                </div>

                &lt;!&ndash;    <div class="input-group mb-3">
                        <div class="input-group-prepend">
                            <span class="input-group-text" id="inputGroup-sizing-nextPageRegex">nextPageRegex</span>
                        </div>
                        <textarea ng-model="updateData.nextPageRegex" type="text" class="form-control" aria-label="Default" aria-describedby="inputGroup-sizing-seedUrl"/>
                    </div>&ndash;&gt;
                <div class="input-group mb-3">
                    <div class="input-group-prepend">
                        <span class="input-group-text" id="inputGroup-sizing-nextButton">"下一页"位置</span>
                    </div>
                    <textarea ng-model="updateData.nextButton" type="text" class="form-control" aria-label="Default"
                              aria-describedby="inputGroup-sizing-seedUrl"/>
                </div>
                <div class="input-group mb-3">
                    <div class="input-group-prepend">
                        <span class="input-group-text" id="inputGroup-sizing-contentRegex">爬取网页上的哪个部分</span>
                    </div>
                    <textarea ng-model="updateData.contentElement" type="text" class="form-control" aria-label="Default"
                              aria-describedby="inputGroup-sizing-seedUrl"/>
                </div>

                <div class="input-group mb-3" ng-repeat="custom in customResult">
                    <div class="input-group-prepend">
                        <span class="input-group-text" id="inputGroup-sizing-titleSelect">{{custom.customSelect}}</span>
                    </div>
                    <textarea ng-model="custom.selectDescribe" type="text" class="form-control" aria-label="Default"
                              aria-describedby="inputGroup-sizing-titleSelect"/>
                    <button type="button" data-dismiss="modal" ng-click="deleteParse(custom)" class="close"
                            aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>

                &lt;!&ndash; <div class="input-group mb-3">
                     <div class="input-group-prepend">
                         <span class="input-group-text" id="inputGroup-sizing-contentSelect">contentSelect</span>
                     </div>
                     <textarea ng-model="updateData.contentSelect" type="text" class="form-control" aria-label="Default" aria-describedby="inputGroup-sizing-contentSelect"/>
                 </div>&ndash;&gt;
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
                <button type="button" class="btn btn-primary" data-dismiss="modal" ng-click="confirm()">保存</button>
            </div>
        </div>
    </div>
</div>
-->

<div class="modal" id="delete" tabindex="-1" role="dialog">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">删除确认</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <h5 style="text-align: center">确定删除吗？</h5>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" data-dismiss="modal" ng-click="confirmDelete()">是</button>
                <button type="button" class="btn btn-secondary" data-dismiss="modal">否</button>
            </div>
        </div>
    </div>
</div>


<!--    add-->
<div class="modal fade" id="new" tabindex="-1" role="dialog" aria-labelledby="exampleModalLongTitle" aria-hidden="true">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">新增页面抓取相关配置</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <div class="input-group mb-3">
                    <div class="input-group-prepend">
                        <span class="input-group-text">url_describe</span>
                    </div>
                    <input ng-model="newConfig.seedDescribe" type="text" class="form-control" aria-label="Default"
                           aria-describedby="inputGroup-sizing-describe"/>
                </div>

                <div class="input-group mb-3">
                    <div class="input-group-prepend">
                        <span class="input-group-text" id="inputGroup-sizing-seedUrl">url</span>
                    </div>
                    <textarea ng-model="newConfig.seedUrl" type="text" class="form-control" aria-label="Default"
                              aria-describedby="inputGroup-sizing-seedUrl"/>
                </div>


               <!-- <div class="input-group mb-3">
                    <div class="input-group-prepend">
                        <span class="input-group-text">next_button</span>
                    </div>
                    <textarea ng-model="newConfig.nextButton" type="text" class="form-control" aria-label="Default"
                              aria-describedby="inputGroup-sizing-seedUrl"/>
                </div>
                <div class="input-group mb-3">
                    <div class="input-group-prepend">
                        <span class="input-group-text">content_element</span>
                    </div>
                    <textarea ng-model="newConfig.contentElement" type="text" class="form-control" aria-label="Default"
                              aria-describedby="inputGroup-sizing-seedUrl"/>
                </div>-->
              <!--  <div class="input-group mb-3">
                    <div class="input-group-prepend">
                        <div class="input-group-text">
                            <input type="checkbox" aria-label="Checkbox for following text input" ng-click="isChecked(newConfig)" >
                        </div>
                    </div>
                    <input type="text" class="form-control" aria-label="Text input with checkbox" value="是否设置定时" readonly>
                </div>
           &lt;!&ndash;     <div class="input-group mb-3" ng-show="newConfig.checked==true">
                    <div class="input-group-prepend">
                        <span class="input-group-text">rule_id</span>
                    </div>
                    <input ng-model="config.ruleId" type="text" class="form-control"
                           aria-label="Sizing example input" aria-describedby="inputGroup-sizing-default">
                </div>&ndash;&gt;
                <div class="input-group mb-3" ng-show="newConfig.checked==true">
                    <div class="input-group-prepend">
                        <span class="input-group-text">corn表达式</span>
                    </div>
                    <input ng-model="newConfig.cron" type="text" class="form-control"
                           aria-label="Sizing example input" aria-describedby="inputGroup-sizing-default">
                </div>-->

            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
                <button type="button" class="btn btn-primary" data-dismiss="modal" ng-click="confirmAdd(newConfig)">保存
                </button>
            </div>
        </div>
    </div>
</div>
<!--新增解析配置-->
<!--<div class="modal" id="parse" tabindex="-1" role="dialog">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">新增解析配置</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <div class="input-group mb-3">
                    <div class="input-group-prepend">
                        <span class="input-group-text" id="inputGroup-sizing-default">自定义爬取位置描述</span>
                    </div>
                    <input ng-model="parseConfig.customSelect" type="text" class="form-control"
                           aria-label="Sizing example input" aria-describedby="inputGroup-sizing-default">
                </div>
                <div class="input-group mb-3">
                    <div class="input-group-prepend">
                        <span class="input-group-text">自定义爬取位置（选择器）</span>
                    </div>
                    <input ng-model="parseConfig.selectDescribe" type="text" class="form-control"
                           aria-label="Sizing example input" aria-describedby="inputGroup-sizing-default">
                </div>

            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
                <button type="button" class="btn btn-primary" data-dismiss="modal" ng-click="commitParse(parseConfig)">
                    保存
                </button>
            </div>
        </div>
    </div>
</div>-->


<!--<div class="modal" id="modifyQuartz" tabindex="-1" role="dialog">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">修改定时任务</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">

                <div class="input-group mb-3">
                    <div class="input-group-prepend">
                        <span class="input-group-text">rule_id</span>
                    </div>
                    <input ng-model="config.ruleId" type="text" class="form-control"
                           aria-label="Sizing example input" aria-describedby="inputGroup-sizing-default" disabled>
                </div>
                <div class="input-group mb-3">
                    <div class="input-group-prepend">
                        <span class="input-group-text">corn表达式</span>
                    </div>
                    <input ng-model="config.cron" type="text" class="form-control"
                           aria-label="Sizing example input" aria-describedby="inputGroup-sizing-default">
                </div>

            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
                <button type="button" class="btn btn-primary" data-dismiss="modal" ng-click="modifyQuartzSure(config)">
                    保存
                </button>
            </div>
        </div>
    </div>
</div>


<div class="modal" id="addQuartz" tabindex="-1" role="dialog">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">设置定时任务</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">

                <div class="input-group mb-3">
                    <div class="input-group-prepend">
                        <span class="input-group-text">rule_id</span>
                    </div>
                    <input ng-model="config.ruleId" type="text" class="form-control"
                           aria-label="Sizing example input" aria-describedby="inputGroup-sizing-default" readonly>
                </div>
                <div class="input-group mb-3">
                    <div class="input-group-prepend">
                        <span class="input-group-text">corn表达式</span>
                    </div>
                    <input ng-model="config.cron" type="text" class="form-control"
                           aria-label="Sizing example input" aria-describedby="inputGroup-sizing-default">
                </div>

            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
                <button type="button" class="btn btn-primary" data-dismiss="modal" ng-click="addQuartzSure(config)">
                    保存
                </button>
            </div>
        </div>
    </div>
</div>-->
